<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
	<?php $this->load->view('common/top', array('title' => 'SEWIKI - Login')); ?>
	<body>
		<div id="container">
			<?php $this->load->view('common/header'); ?>
			<script type="text/javascript">
				$(function(){
					$("#jump_to_reg").click(function(){
						alert("test");
						document.location.href="<?=site_url('user/register')?>";
					});
				});
			</script>
			<div id="content">
				<div id="login_msg">
					<?php if($this->session->userdata('login_error') == true): ?>
						<?php echo $this->session->userdata('login_error_msg');?>
						<?php $this->session->unset_userdata('login_error'); ?>
						<?php $this->session->unset_userdata('login_error_msg'); ?>
					<?php endif; ?>
				</div>
				<div id="login_form">
					<?=form_open()?>
						<table id="login_table" style="margin:auto;background:#eee">
							<tbody>
								<tr>
									<td><?=form_label('用户名', 'username')?></td>
									<td><?=form_input(array(
										'name'        => 'username',
										'id'          => 'username',
										'value'       => '请输入用户名',
										'onMouseOver' => 'this.focus()',
										'onMouseOut'  => 'if(this.value==\'\')this.value=\'请输入用户名\';',
										'onFocus'     => 'this.select()',
										'onClick'     => 'if(this.value==\'请输入用户名\') this.value=\'\';'))?>
									</td>
								</tr>
								<tr>
									<td><?=form_label('密码', 'password')?></td>
									<td><?=form_password(array(
										'name'        => 'password',
										'id'          => 'password',
										'value'       => '请输入密码',
										'onMouseOver' => 'this.focus()',
										'onMouseOut'  => 'if(this.value==\'\')this.value=\'请输入密码\';',
										'onFocus'     => 'this.select()',
										'onClick'     => 'if(this.value==\'请输入密码\') this.value=\'\';'))?>
									</td>
								<tr>
									<td colspan="2" align="center">
										<?=form_submit(array('name' => 'login', 'value' => '登录'))?>
										<input type="button" onClick="window.location.href='<?=site_url('user/register')?>'" value="注册"/>
									</td>
								</tr>
							</tbody>
						</table>
					<?=form_close()?>
				</div>
			</div>
			<?php $this->load->view('common/footer') ?>
		</div>
	</body>
</html>